Ext.define('Admin.view.authentication.PasswordReset', {
    extend: 'Admin.view.authentication.LockingWindow',
    xtype: 'passwordreset',

    requires: [
        'Admin.view.authentication.Dialog',
        'Ext.form.Label',
        'Ext.form.field.Text',
        'Ext.button.Button'
    ],

    title: '重置密码',

    defaultFocus: 'authdialog',

    items: [{
        xtype: 'authdialog',
        width: 455,
        defaultButton: 'resetPassword',
        autoComplete: true,
        bodyPadding: '20 20',
        layout: {
            type: 'vbox',
            align: 'stretch'
        },

        defaults: {
            margin: '10 0'
        },

        cls: 'auth-dialog-login',
        items: [{
                xtype: 'label',
                cls: 'lock-screen-top-label',
                text: '输入你的验证邮箱'
            },
            {
                xtype: 'textfield',
                cls: 'auth-textbox',
                height: 55,
                name: 'email',
                hideLabel: true,
                allowBlank: false,
                emptyText: 'user@example.com',
                vtype: 'email',
                triggers: {
                    glyphed: {
                        cls: 'trigger-glyph-noop auth-email-trigger'
                    }
                }
            },
            {
                xtype: 'button',
                reference: 'resetPassword',
                scale: 'large',
                ui: 'soft-blue',
                formBind: true,
                iconAlign: 'right',
                iconCls: 'x-fa fa-angle-right',
                text: '确认',
                listeners: {
                    click: 'onResetClick'
                }
            },
            {
                xtype: 'component',
                html: '<div style="text-align:right">' +
                    '<a href="#login" class="link-forgot-password">' +
                    '返回登录</a>' +
                    '</div>'
            }
        ]
    }]
});